#ifndef RT_CONFIG_H__
#define RT_CONFIG_H__

/* RT-Thread Kernel */
//#define BSP_RTC_USING_XTAL32
/* klibc options */

/* rt_vsnprintf options */

/* end of rt_vsnprintf options */

/* rt_vsscanf options */

/* end of rt_vsscanf options */

/* rt_memset options */

/* end of rt_memset options */

/* rt_memcpy options */

/* end of rt_memcpy options */

/* rt_memmove options */

/* end of rt_memmove options */

/* rt_memcmp options */

/* end of rt_memcmp options */

/* rt_strstr options */

/* end of rt_strstr options */

/* rt_strcasecmp options */

/* end of rt_strcasecmp options */

/* rt_strncpy options */

/* end of rt_strncpy options */

/* rt_strcpy options */

/* end of rt_strcpy options */

/* rt_strncmp options */

/* end of rt_strncmp options */

/* rt_strcmp options */

/* end of rt_strcmp options */

/* rt_strlen options */

/* end of rt_strlen options */

/* rt_strnlen options */

/* end of rt_strnlen options */
/* end of klibc options */

/* ADC Options */
#define BSP_USING_ADC
#define BSP_USING_ADC1
/* end of ADC Options */

/* RTC Options */
#define RT_USING_RTC
#define BSP_USING_RTC
/* end of RTC Options */

/* ulog Options */
#define DBG_ENABLE
#define RT_USING_ULOG
#define ULOG_USING_SYSLOG
#define ULOG_USING_FILTER
#define ULOG_TIME_USING_TIMESTAMP
#define ULOG_USING_ASYNC_OUTPUT
#define ULOG_ASYNC_OUTPUT_BUF_SIZE 4096
#define ULOG_ASYNC_OUTPUT_THREAD_STACK 2048
#define ULOG_ASYNC_OUTPUT_THREAD_PRIORITY 30
#define ULOG_OUTPUT_LVL_D
#define ULOG_OUTPUT_LVL 7
#define ULOG_ASSERT_ENABLE
#define ULOG_LINE_BUF_SIZE 128
#define ULOG_USING_COLOR
#define ULOG_OUTPUT_TIME
#define ULOG_OUTPUT_LEVEL
#define ULOG_OUTPUT_TAG
#define ULOG_BACKEND_USING_CONSOLE
#define ULOG_BACKEND_USING_FILE
/* end of ulog Options */

/* ulog_easyFlash Options */
//#define ULOG_EASYFLASH_CFG_SAVE_ENABLE
//#define ULOG_EASYFLASH_BACKEND_ENABLE
/* end of ulog_easyFlash Options */

/* EasyFlash Options */
//#define PKG_USING_EASYFLASH
//#define PKG_EASYFLASH_ENV
//#define PKG_EASYFLASH_ENV_AUTO_UPDATE
//#define PKG_EASYFLASH_ENV_VER_NUM 0
//#define PKG_EASYFLASH_LOG
//#define PKG_EASYFLASH_LOG_AREA_SIZE 4096*2
//#define PKG_EASYFLASH_IAP
//#define PKG_EASYFLASH_ERASE_GRAN 4096
//#define PKG_EASYFLASH_WRITE_GRAN_1BIT
//#define PKG_EASYFLASH_WRITE_GRAN 1
//#define PKG_EASYFLASH_START_ADDR 0x01CFC000
//#define PKG_EASYFLASH_DEBUG
//#define PKG_USING_EASYFLASH_V410
//#define PKG_EASYFLASH_VER_NUM 0x40100
//#define PKG_USING_EASYLOGGER
/* end of EasyFlash Options */

/* EasyLogger Options */
//#define PKG_EASYLOGGER_ASYNC_OUTPUT_BUF_SIZE 1024
//#define PKG_EASYLOGGER_ENABLE_ASYNC_OUTPUT
//#define PKG_EASYLOGGER_ENABLE_OUTPUT
//#define PKG_EASYLOGGER_OUTPUT_LVL_VERBOSE
//#define PKG_EASYLOGGER_ENABLE_ASSERT
//#define PKG_EASYLOGGER_LINE_BUF_SIZE 256
//#define PKG_EASYLOGGER_FILTER_TAG_MAX_LEN 30
//#define PKG_EASYLOGGER_FILTER_KW_MAX_LEN 16
//#define PKG_EASYLOGGER_ENABLE_COLOR
//#define PKG_EASYLOGGER_FLASH_BUF_SIZE 1024
/* end of EasyLogger Options */

#define RT_NAME_MAX 8
#define RT_CPUS_NR 1
#define RT_ALIGN_SIZE 8
#define RT_THREAD_PRIORITY_32
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 1000
#define RT_USING_OVERFLOW_CHECK
#define RT_USING_HOOK
#define RT_HOOK_USING_FUNC_PTR
//#define RT_USING_IDLE_HOOK
#define RT_IDLE_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 1024

/* kservice options */

/* end of kservice options */
#define RT_USING_DEBUG
#define RT_DEBUGING_ASSERT
#define RT_DEBUGING_COLOR
#define RT_DEBUGING_CONTEXT

/* Inter-Thread communication */

#define RT_USING_SEMAPHORE
#define RT_USING_MUTEX
#define RT_USING_EVENT
#define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE
/* end of Inter-Thread communication */

/* Memory Management */
#define RT_USING_MEMPOOL
#define RT_USING_SMALL_MEM
#define RT_USING_SMALL_MEM_AS_HEAP
#define RT_USING_HEAP
/* end of Memory Management */
#define RT_USING_DEVICE
#define RT_USING_CONSOLE 
#define RT_CONSOLEBUF_SIZE 2048
#define RT_CONSOLE_DEVICE_NAME "usart1"//"jlinkRtt"
#define RT_VER_NUM 0x50200
#define RT_BACKTRACE_LEVEL_MAX_NR 128
#define RT_CONSOLE_CRLF // 自动将\n转换为\r\n

#define PKG_USING_SEGGER_RTT
#define SEGGER_RTT_ENABLE
#define SEGGER_RTT_MAX_NUM_UP_BUFFERS 3
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS 3
#define BUFFER_SIZE_UP 2048
#define BUFFER_SIZE_DOWN 1024
#define SEGGER_RTT_PRINTF_BUFFER_SIZE 64
#define RTT_DEFAULT_BUFFER_INDEX 0
#define RTT_DEFAULT_TERMINAL_INDEX 0
#define PKG_USING_SEGGER_RTT_LATEST_VERSION


/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4

/* RT-Thread Components */

#define RT_USING_TRACE
#define PKG_USING_SYSTEMVIEW
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
#define RT_MAIN_THREAD_STACK_SIZE 1024
#define RT_MAIN_THREAD_PRIORITY 15
#define RT_USING_MSH
#define RT_USING_FINSH
#define FINSH_USING_MSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 3072
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
#define FINSH_CMD_SIZE 80
#define MSH_USING_BUILT_IN_COMMANDS
#define FINSH_USING_DESCRIPTION
#define FINSH_ARG_MAX 10
#define FINSH_USING_OPTION_COMPLETION


#define RT_USING_LIBC
/* DFS: device virtual file system */
//#define RT_USING_DFS_MNTTABLE
//#define RT_USING_PAGECACHE
#define RT_USING_DFS_TMPFS
#define RT_USING_DEV_BUS 
#define RT_USING_DFS_DEVFS
#define RT_USING_DFS
#define DFS_USING_WORKDIR  // 启用工作目录
#define RT_USING_DFS_V1    // 必须启用 V2
#define DFS_USING_POSIX

#define RT_USING_DEVICE
#define RT_USING_CONSOLE
#define RT_USING_DFS_LITTLEFS
#define DFS_FD_MAX 16
#define DFS_FILESYSTEMS_MAX 16
#define DFS_FILESYSTEM_TYPES_MAX 16
#define RT_USING_MEMHEAP
/* end of DFS: device virtual file system */

//#define SFUD_DEBUG_MODEdf

#define RT_USING_DFS_ELMFAT       // 使用可靠的FAT文件系统
#define RT_DFS_ELM_USE_LFN 3      // 启用长文件名支持
#define RT_DFS_ELM_REENTRANT 1    // 启用可重入支持
#define RT_DFS_ELM_DRIVES 2       // 支持多个驱动器


#define RT_USING_MTD_NOR
#define FAL_PART_HAS_FLAG   // 启用分区标志位功能
#define RT_SFUD_USING_SFDP
#define RT_SFUD_USING_FLASH_INFO_TABLE
#define RT_DEBUG_MODULE
#define BSP_USING_ON_CHIP_FLASH
#define RT_USING_FAL
#define RT_USING_SFUD
#define FAL_USING_DEBUG
#define FAL_PART_HAS_TABLE_CFG
#define FAL_USING_SFUD_PORT
#define FAL_USING_NOR_FLASH_DEV_NAME "GD25B512ME"
/* Device Drivers */

#define RT_USING_DEVICE_IPC
#define RT_UNAMED_PIPE_NUMBER 64
#define RT_USING_SYSTEM_WORKQUEUE
#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
#define RT_SYSTEM_WORKQUEUE_PRIORITY 23
#define RT_USING_SERIAL 1
//#define RT_USING_SERIAL_V1
//#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 2048
#define RT_USING_I2C
#define RT_USING_I2C_BITOPS
#define BSP_USING_I2C1_SW
#define BSP_USING_I2C2_SW

#define RT_USING_ADC
#define RT_USING_INPUT_CAPTURE
#define RT_INPUT_CAPTURE_RB_SIZE 100
#define RT_USING_SPI
#define RT_USING_PIN

#define RT_YMODEM_OUTTIME 30
#define SYSWATCH_USING_TEST
#define BSP_USING_WDT_TMR
#define BSP_USING_WDT
#define PKG_USING_SYSWATCH

/* end of Device Drivers */

/* C/C++ and POSIX layer */

/* ISO-ANSI C layer */

/* Timezone and Daylight Saving Time */

//#define RT_LIBC_USING_LIGHT_TZ_DST
#define RT_LIBC_TZ_DEFAULT_HOUR 8
#define RT_LIBC_TZ_DEFAULT_MIN 0
#define RT_LIBC_TZ_DEFAULT_SEC 0
/* end of Timezone and Daylight Saving Time */
/* end of ISO-ANSI C layer */

/* POSIX (Portable Operating System Interface) layer */


/* Interprocess Communication (IPC) */


/* Socket is in the 'Network' category */

/* end of Interprocess Communication (IPC) */
/* end of POSIX (Portable Operating System Interface) layer */
/* end of C/C++ and POSIX layer */

/* Network */

/* end of Network */

/* Memory protection */


#define RT_USING_MEM_PROTECTION
#define USE_MEM_PROTECTION_EXAMPLES
#define NUM_MEM_REGIONS 
#define NUM_EXCLUSIVE_REGIONS 
#define NUM_CONFIGURABLE_REGIONS 
/* end of Memory protection */

/* Utilities */

/* end of Utilities */

/* Using USB legacy version */

/* end of Using USB legacy version */
/* end of RT-Thread Components */

/* RT-Thread online packages */

/* IoT - internet of things */


/* Wi-Fi */

/* Marvell WiFi */

/* end of Marvell WiFi */

/* Wiced WiFi */

/* end of Wiced WiFi */

/* CYW43012 WiFi */

/* end of CYW43012 WiFi */

/* BL808 WiFi */

/* end of BL808 WiFi */

/* CYW43439 WiFi */

/* end of CYW43439 WiFi */
/* end of Wi-Fi */

/* IoT Cloud */
#define PKG_USING_YMODEM_OTA
/* end of IoT Cloud */
/* end of IoT - internet of things */

/* security packages */

/* end of security packages */

/* language packages */

/* JSON: JavaScript Object Notation, a lightweight data-interchange format */

/* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */

/* XML: Extensible Markup Language */

/* end of XML: Extensible Markup Language */
/* end of language packages */

/* multimedia packages */

/* LVGL: powerful and easy-to-use embedded GUI library */

/* end of LVGL: powerful and easy-to-use embedded GUI library */

/* u8g2: a monochrome graphic library */

/* end of u8g2: a monochrome graphic library */
/* end of multimedia packages */

/* tools packages */

/* end of tools packages */

/* system packages */

/* enhanced kernel services */

/* end of enhanced kernel services */

/* acceleration: Assembly language or algorithmic acceleration packages */

/* end of acceleration: Assembly language or algorithmic acceleration packages */

/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */

/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */

/* Micrium: Micrium software products porting for RT-Thread */

/* end of Micrium: Micrium software products porting for RT-Thread */
/* end of system packages */

/* peripheral libraries and drivers */

/* HAL & SDK Drivers */

/* STM32 HAL & SDK Drivers */

/* end of STM32 HAL & SDK Drivers */

/* Infineon HAL Packages */

/* end of Infineon HAL Packages */

/* Kendryte SDK */

/* end of Kendryte SDK */
/* end of HAL & SDK Drivers */

/* sensors drivers */

/* end of sensors drivers */

/* touch drivers */

/* end of touch drivers */
/* end of peripheral libraries and drivers */

/* AI packages */

/* end of AI packages */

/* Signal Processing and Control Algorithm Packages */

/* end of Signal Processing and Control Algorithm Packages */

/* miscellaneous packages */

/* project laboratory */

/* end of project laboratory */

/* samples: kernel and components samples */

/* end of samples: kernel and components samples */

/* entertainment: terminal games and other interesting software packages */

/* end of entertainment: terminal games and other interesting software packages */
/* end of miscellaneous packages */

/* Arduino libraries */


/* Projects and Demos */

/* end of Projects and Demos */

/* Sensors */

/* end of Sensors */

/* Display */

/* end of Display */

/* Timing */

/* end of Timing */

/* Data Processing */

/* end of Data Processing */

/* Data Storage */

/* Communication */

/* end of Communication */

/* Device Control */

/* end of Device Control */

/* Other */

/* end of Other */

/* Signal IO */

/* end of Signal IO */

/* Uncategorized */

/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_HC32
#define SOC_SERIES_HC32F4

/* Hardware Drivers Config */

#define SOC_HC32F460PE

/* On-chip Drivers */

#define BSP_USING_ON_CHIP_FLASH_CACHE
/* end of On-chip Drivers */

/* Onboard Peripheral Drivers */

/* end of Onboard Peripheral Drivers */

/* On-chip Peripheral Drivers */
#define RT_USING_DEVICE_OPS
#define BSP_USING_GPIO
//#define BSP_USING_UART
//#define BSP_USING_UART4
//#define BSP_USING_I2C
//#define BSP_USING_I2C_HW
//#define BSP_USING_I2C3
#define BSP_USING_SPI
#define BSP_USING_SPI1
#define BSP_USING_SPI2
#define BSP_USING_SPI3
#define BSP_SPI3_TX_USING_DMA
#define BSP_SPI3_RX_USING_DMA
#define BSP_SPI_USING_DMA
//#define BSP_USING_USBD
//#define BSP_USING_ADC
//#define BSP_USING_INPUT_CAPTURE
/* end of On-chip Peripheral Drivers */

/* Board extended module Drivers */

/* end of Hardware Drivers Config */

#endif
